/**
 * 
 */
function calendar(data) {
	var isDeadline = true;
	$("#deadline").click(function(event){
		$(this).css("background","RED");
		//$("#appearance_time").css("background","WHITE");
		isDeadline = true;
	});
	$("#appearance_time").click(function(event){
		$(this).css("background","RED");
		//$("#deadline").css("background","WHITE");
		isDeadline = false;
	});
	
	var date = new Date();
	var d = date.getDate();
	var m = date.getMonth();
	var y = date.getFullYear();

	$('#calendar').fullCalendar({
		theme : true,
		header : {
			left : 'prev,next today',
			center : 'title',
			right : 'month,agendaWeek,agendaDay'
		},
		selectable: true,
		editable : true,
		select: function(start,end,allDay){
			//alert("Input"+start+" "+end+" "+allDay);
			//$.post("/frontend_dev.php/login/logout");
			//window.location.reload();
			window.location="/frontend_dev.php/product/new?start="+start+"&end="+end;
		},
		eventClick: function(event){
			//alert(event.title);
			return true;
		},
		events : []
	});
}
